<%inherit file="base.mako" />

	<ul id="undonetodos">
		## get the list of tasks
		% for task in c.tasks:
		<li>
			<form action="complete" method="post" accept-charset="utf-8">
				<input type="hidden" name="task_id" value="${task.id}" id="task_id">
				<input type="submit" name="submit" value="Complete" id="submit">
				${task.task}
					## show the tags for this task 
					<span style="font-size:9px;"><b>Tags:</b> 
					% for tag in task.tags:
						${tag.name}, 
					% endfor
					</span>
						
			</form>
		</li>	
		% endfor
	</ul>
	<input type="submit" name="submit" value="complete task" id="submit">
</form>

<p>
	Add a Task:<br />
	## add a new todo item
	<form action="/add" method="POST">
		Task: <input type="text" name="newtask" value="" id="newtask">
		<br />Tags: <input type="text" name="newtags" value="" id="newtags">
		<input type="submit" name="submit" value="Add Tag" id="submit">
	</form>